//
//  MinePocketCell.swift
//  E-CycleForShop
//
//  Created by enghou on 17/3/8.
//  Copyright © 2017年 xyxorigation. All rights reserved.
//

import UIKit
class TarghModel : NSObject{
    var image : String = ""
    var title : String = ""
    
}
class MinePocketCell: UITableViewCell {

    var model : TarghModel = TarghModel.init() {
        didSet{
            imgView!.image = UIImage.load(name: model.image)
            titleLbl!.text = model.title
        }
    }
    private var imgView : UIImageView?
    private var titleLbl : UILabel?
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        imgView = UIImageView.init()
        imgView!.frame = CGRect.init(origin: CGPoint.init(x: 28 * YXWidthScale, y: 28 * YXHeightScale), size: CGSize.init(width: 50 * YXWidthScale, height: 50 * YXHeightScale))
        self.contentView.addSubview(imgView!)
        titleLbl = UILabel.init()
        let font = UIFont.systemFont(ofSize: 32 * YXWidthScale)
        let size = "我要提现".StringSize(font: font)
        titleLbl!.frame = CGRect.init(origin: CGPoint.init(x: imgView!.right() + 28 * YXWidthScale, y: 100 * YXHeightScale / 2 - size.height / 2), size: size)
        titleLbl!.textColor = UIColor.colorWithHexString(hex: "2c2c2c")
        titleLbl!.font = font
        self.contentView.addSubview(titleLbl!)
        
        let imageView = UIImageView.init()
        imageView.frame = CGRect.init(origin: CGPoint.init(x: YXDeviceWidth - 54 * YXWidthScale - 24 * YXWidthScale, y: 36 * YXHeightScale), size: CGSize.init(width: 24 * YXWidthScale, height: 40 * YXHeightScale))
        imageView.image = UIImage.load(name: "icon_enter")
        self.contentView.addSubview(imageView)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        // Configure the view for the selected state
    }

}
